package sample.util;

import java.util.concurrent.Future;

import com.google.apphosting.api.ApiProxy;
import com.google.apphosting.api.ApiProxy.ApiConfig;
import com.google.apphosting.api.ApiProxy.ApiProxyException;
import com.google.apphosting.api.ApiProxy.Environment;
import com.google.apphosting.api.ApiProxy.LogRecord;

public class MyDelegate implements ApiProxy.Delegate<Environment>{

	@SuppressWarnings("unchecked")  
	private final ApiProxy.Delegate<Environment> original = ApiProxy.getDelegate();
	
	@Override
	public void log(Environment arg0, LogRecord arg1) {
		// TODO 自動生成されたメソッド・スタブ
		
	}

	@Override
	public Future<byte[]> makeAsyncCall(Environment arg0, String arg1,
			String arg2, byte[] arg3, ApiConfig arg4) {
		// TODO 自動生成されたメソッド・スタブ
		return null;
	}

	@Override
	  public byte[] makeSyncCall(Environment environment,String packageName,String methodName,byte[] request)throws ApiProxyException {  
		if (packageName.equals("datastore_v3")) {  
			System.out.println("makeSyncCall:" + packageName + ":" + methodName);  
		}  
		return original.makeSyncCall(environment, packageName, methodName, request);  
	}  


}

